package com.winit.config.repository;

import com.winit.common.BaseRepository;
import com.winit.config.model.Config;
import org.springframework.data.cassandra.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.UUID;

/**
 * Created by wangjian on 2017/9/27.
 */
@Repository
public interface ConfigRepository extends SuperConfigRepository, BaseRepository<Config,UUID>{

    @Query("select * from uconfig_config")
    List<Config> findAll();

//    @Query("select * from uconfig_config where config_id = b37df741-9e87-11e7-88fe-a76badd5d579")
    @Query("select * from uconfig_config where config_id = ?0")
    Config findByConfigId(UUID configId);

//    @Query()
//    Config findByIdAndSpecifiedFields(UUID uuid, String )

//    @Query
//    List<Config>

}
